<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>地图导航</title>
    <style>
      * {
        margin: 0;
        padding: 0;
      }
      #container {
        width: 100%;
        height: 100vh;

      }
    </style>
    <script type="text/javascript">
      window._AMapSecurityConfig = {
          securityJsCode:'752726084aba7fefbc7e0ff9ce61c13d',
      }
</script>
    <script type="text/javascript" src="https://webapi.amap.com/maps?v=1.4.15&key=9c3f800c3d3d649189dc8c1af1697e12"></script>
  </head>
  <body>
    <div id="container"></div>

    <script>
    var map = new AMap.Map("container", {
       zoom: 15, //级别
       center: [116.397428, 39.90923], //中心点坐标
     })

   window.onload = async function () {
        if(window.shengling) {
          shengling.getLocation("getLocation")
        }
     }
    function getLocation (lon, lat) {
       map.setZoomAndCenter(18,[lon,lat])
    }


   </script>
  </body>
</html>
